package com.weharvest.edu.utlis;

import com.weharvest.edu.dao.mapper.BackstageRoleDaoMapper;
import com.weharvest.edu.dto.BackstageUserDTO;
import com.weharvest.edu.entity.BackstageRole;
import com.weharvest.edu.enums.CommonEnums;
import com.weharvest.edu.enums.ResultEnum;
import com.weharvest.edu.exception.EduException;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

public class RoleUtil {

//    public BackstageRole getRole(BackstageUserDTO dto, BackstageRoleDaoMapper dao, HttpServletRequest request) {
//        Map<String, Object> paramsByBuor = new HashMap<>();
//        paramsByBuor.put("userId", SessionUtil.getSession(request, "uid"));
//        paramsByBuor.put("organizationId", dto.getOrganizationId());
//        paramsByBuor.put("flag", CommonEnums.flag.FLAG_AVAILABLE.getCode());
//        BackstageRole backstageRole = dao.queryByBuor(paramsByBuor);
//        if (null == backstageRole) {
//            throw new EduException(ResultEnum.BACKSTAGEROLE_FIND_RESULT_NODATA);
//        }
//        return backstageRole;
//    }
}
